<?php
require_once ($_SERVER ['DOCUMENT_ROOT'] . '/aduc272/configs/configs.php');
require_once (MODEL_PATH . "cv/cvInfo.php");
require_once (CORE_PATH . "mvc.php");

// Get current language
$current_language = "en";
if(isset($_GET["language"])) {
	$current_language = $_GET["language"];
}

// Get current xml date by current language
$xmlPath = "";

switch ($current_language) {	
	case 'fr': 
		include(LANGUAGE_PATH.'cv.fr-FR.php');
		$xmlPath = W3C_PATH."xml/cv/cv.fr-FR.xml"; 
		break;
	case 'vi': 
		include(LANGUAGE_PATH.'cv.vi-VI.php'); 
		$xmlPath = W3C_PATH."xml/cv/cv.vi-VI.xml"; 
		break;
	default:
		$current_language = "en";
		include(LANGUAGE_PATH.'cv.en-EN.php');
		$xmlPath = W3C_PATH."xml/cv/cv.en-EN.xml"; 
}

$cvInfo = new CvInfo();
$cvInfo->loadXML($xmlPath);

$data["cvInfo"] = $cvInfo;
$data["current_language"] = $current_language;
// get cv view
$view_path = VIEW_PATH.'cv/cv.php';
load_view($view_path, $data);

?>

